#pragma once
#include "EngineObject.h"
#include "GpuProgram.h"
#include "ResourceFactory.h"
#include "RenderStateDefine.h"

namespace DreamEngine
{
class _EngineExport CMaterial : public CEngineObject 
{
public:

	CMaterial(const CString& name);
	~CMaterial(void);

	const CString&		GetName(void)const					{return m_name;}

	CGpuProgram*		GetVertexProgram(void)const			{return m_pVertexProgram;}
	CGpuProgram*		GetFragmentProgram(void)const		{return m_pFragmentProgram;}

	void				SetVertexProgram(CGpuProgram* pVertexProgram);
	void				SetFragmentProgram(CGpuProgram* pFragmentProgram);

public:

	CString			m_name;

	CGpuProgram*	m_pVertexProgram;
	CGpuProgram*	m_pFragmentProgram;

	CULLMODE		m_cullMode;
	FILLMODE		m_fillMode;
	bool			m_isZTestEnble;
};


}


